package com.bustle.product.dto.provider;

import javax.ejb.EJB;
import javax.ejb.Local;
import javax.ejb.Stateless;

import com.bustle.commons.Mapper;

@Local
public interface ProviderDtoMapper extends Mapper<ProviderDto, ProviderDto>
{
  @Stateless
  static public class DefaultProviderDtoMapper implements ProviderDtoMapper
  {
    @Override
    public ProviderDto map(ProviderDto aSource, ProviderDto aDestination)
    {
      return dataToDtoMapConverter.map(dtoToDataMapConverter.convert(aSource), aDestination);
    }

    @EJB
    protected DtoToProviderMapConverter dtoToDataMapConverter;
    @EJB
    protected ProviderToDtoMapConverter dataToDtoMapConverter;
  }
}
